/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package br.com.yaba.dbs.core;

import java.io.Serializable;

/**
 *
 * @author emanuellfaustino
 */
public class Message implements Serializable {
    public static final int SUCESS = 0;
    public static final int FAIL = 1;
    private String _msg;
    
    private int _type;

    public Message(int type, String msg) {
        _type = type;
        _msg = msg;
    }
    
    public boolean isSuccess() {
        return _type == SUCESS;
    }
    
    public boolean isFail() {
        return _type == FAIL;
    }
    
    public String getMessage() {
        return _msg;
    }
}
